<%--
  Created by IntelliJ IDEA.
  User: 27939
  Date: 2022/11/23
  Time: 16:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<table border="1">


<c:forEach items="${listAll.list}" var="student">
    <tr>
        <td>${student.id}</td>
        <td>${student.username}</td>
        <td>${student.password}</td>
        <td><a href="${pageContext.request.contextPath}/modify?id=${student.id}">修改</a>|<a onclick="return confirm('确定要删除吗？')" href="${pageContext.request.contextPath}/delete?id=${student.id}">删除</a></td>
    </tr>
</c:forEach>
        <td colspan="3">
           <a href="/listStudent?currentPage=1&pageSize=${listAll.pageSize}">首页</a>
           <a href="/listStudent?currentPage=${listAll.currentPage-1}&pageSize=${listAll.pageSize}">上一页</a>
           <c:forEach var="num" begin="1" end="${listAll.pageCount}">
               <a href="/listStudent?currentPage=${num}&pageSize=${listAll.pageSize}">${num}</a>
           </c:forEach>
           <a href="/listStudent?currentPage=${listAll.currentPage+1}&pageSize=${listAll.pageSize}">下一页</a>
           <a href="/listStudent?currentPage=${listAll.pageCount}&pageSize=${listAll.pageSize}">尾页</a>
           [共${listAll.currentPage}/${listAll.pageCount}页]
       </td>
</table>
</body>
</html>
